# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-plugins-ugly
pkgver=1.16.2
pkgrel=3
pkgdesc="GStreamer streaming media framework ugly plug-ins"
url="https://gstreamer.freedesktop.org"
arch="all"
license="GPL-2.0-or-later LGPL-2.0-or-later"
replaces="gst-plugins-ugly1"
makedepends="a52dec-dev glib-dev gst-plugins-base-dev gstreamer-dev libcdio-dev
	libdvdread-dev libmpeg2-dev meson orc-dev x264-dev"
source="https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-$pkgver.tar.xz"
subpackages="$pkgname-lang"
ldpath="/usr/lib/gstreamer-1.0"

# secfixes:
#   1.10.4-r0:
#     - CVE-2017-5846
#     - CVE-2017-5847

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dpackage-origin="https://alpinelinux.org" \
		-Dpackage-name="GStreamer ugly plug-ins (Alpine Linux)" \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

check() {
	meson test -C output --print-errorlogs
}

doc() {
	default_doc
	replaces="${pkgname}1-doc"
}

sha512sums="9f393043f51b12b376607e68b3b86437af86e321e3a3566e59c7f3507ed26622211df87e30a23bcc927f37bc11f53ca3b29f1b12bf58e623ce18edc88a9cdee3  gst-plugins-ugly-1.16.2.tar.xz"
